work makAll play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All
HBAM2016AUG95
Pro 3.0
All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a goodCopyright 1984-1997 Claris Corporation
and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy. All play and no work makes John a good boy.
HBAM3016AUG95@
aboutI
about
filespec'sI
defaultq
dialogK
filespecK
filespec'sI
fullpath_
oncep
separatorp
trfile-appendcontent
trfile-contentsdialo
trfile-copyfile
trfile-createfile
trfile-createfolder
trfile-deletefile
trfile-filespec_
trfile-filespec
fullpath_
trfile-findfolder
trfile-folderlist
trfile-fullpath`
trfile-fullpath
filespec`
trfile-getK
trfile-get
filespec
dialogK
trfile-getcontents
trfile-getdatasize
trfile-getdatecreate
trfile-getdatemodifi
trfile-getdatetimecr
trfile-getdatetimemo
files
general
zondag
maandag
dinsdag
woensdag
donderdag
vrijdag
zaterdag
januari
februari
maart
april
augustus
september
oktober
november
december
1st Quarter
2nd Quarter
3rd Quarter
4th Quarter
3/10/99
CFILENAME
FUNCTIONCATEGORY
FUNCTIONDESCRIPTION
FUNCTIONID
File Specification
File Manipulation
Function Overview
Read Me
Function Details
File Copy And Move
Function Details (work)
FMP 4.0 Bug warning
Append To File
Folder Manipulation
Launch
Multi Export
Multi Image Import
Multi Ex-/Import Explanation
Multi Image Import Copy
FolderList
FolderList scripted
Search
Multi PDF Print
FUNCTIONINVERSION
FUNCTIONMAC
FUNCTIONNAME
FUNCTIONSYNTAX
FUNCTIONWIN
GCONTAINER
G GDEMOFILE
GDESTEXPORTFSSPEC
GDESTFILESPEC
GERRORCODE
GEXPORTFSSPEC
GFOLDERLIST
GFOLDERLISTCOMMAND
GFOLDERLISTSWITCHES
GFOLDERSPEC
OTCHES COPY
GFOLDERSPEC
OFILE
GTHEFILESIZE
GTHEFILESPEC
GTHEFILETYPE
GTHERESSIZE
GTHETIMECREATED
GTHETIMEMODIFIED
GUSERINPUT
GVERSION
GXPLATFORMRETURN
RANDOMNR
textB
gNumberB
gVersionB
|("TrFile-Version"
TrFile-Version
gTheFile
gTheFileSpecB
gTheFileSizeB
gTheDataSizeB
gTheDateCreatedB
gTheDateModifiedB
gTheCreatorB
gTheFileTypeB
gTheTimeCreatedB
gTheTimeModifiedB
gTheResSizeB
gTheDateTimeCreatedB
gTheDateTimeModifiedB
gErrorCodeB
A cFileNameB
3) + 1
A gDemoFileB
"A gFullPathB
gUserInputB
FunctionNameB
FunctionMacB
FunctionWinB
FunctionDescriptionB
FunctionSyntaxB
FunctionIDB
FunctionCategoryB
RandomNrB
gTextB
gDestFileSpecB
FunctionInVersionB
gXplatformReturnB
gExportFSSpecB
You can rotate the text by pushing the button
Rotate 13
Below is an example of text:
Guvf grkg vf abj erirnyrq.
Guvf vf n fvzcyr jnl gb cerirag ernqvat ol bguref. Qrpbqr ol ebgngvat ntnva!
Your package includes all software for use with the following configurations:
GeoPort Telecom Adapter and one of the following Macintosh models:
Performa 6360 and all PowerPC processor-based Macintosh and Performa models, except Power Macintosh and Performa 5200, 5300, 6200, 6300 series
GeoPort Telecom Adapter II and one of the following Macintosh models:
Performa 6360 and all PowerPC processor-based Macintosh
P#:-1:2:GeoPort/Express Modem Read MeS
10-06-98T
10-06-98U
ttxtV
TEXTY
15:22:20Z
15:22:20[
1998-06-10 15:22:20]
1998-06-10 15:22:20
Peter peters. Al
HBAM2016AUG95
Pro 3.0
All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters.Co
pyright 1984-1997 Claris Corporation
All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters
. All by himself Peter peters. All by himself Peter peters. All by him
HBAM3016AUG95@
pan unexpected TCP/IP error (
AppleTalk is not enabled ( TCP/IP couldn't be initialized (:the manually set TCP/IP address is configured improperly (Jth
e TCP/IP address is already in use or an address could not be obtained (
; This file is created and used by FileMaker Pro for TCP/IP access.
; It should contain one IP address or host name per line.
; Lines starting with a semicolon are ignored.
FileMaker Hosts
Local Hosts
Specify Host...:FileMaker host name is limited to 32
When you cancel a result "$$-1" is returned. In your scripts you should test for this result.
ateTimeModified"
TrFile-GetDateTimeModified
TrFile-GetContents
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe Desktop Folder is found. Now we append the name of a file, "demofile.txt" and this is used to create a new file on the desktop.F\
|("TrFile-SetDefaultCreator"
"ttxt")
TrFile-SetDefaultCreator
ttxt|GV
|("TrFile-SetDefaultType"
"TEXT")
TrFile-SetDefaultType
TEXT|H9
& "demofile.txt"
demofile.txt
|("TrFile-CreateFile"
TrFile-CreateFile
K$file was created ok. (errorcode = 0)L
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe (empty) file "demofile.txt" was created on the desktop.M
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe (empty) file "demofile.txt" could not be created on the desktop.
Check if it already exists.
I#Troi File Plug-in Function OverviewQ
To MenuW
Function Overview
Print`
N.A. = Not Applicableb
1997,1998 Troi Automatiseringe%click a function name to view detailsi
Category
Read MeB
Function DetailsB
Dialog Plug-in will display a dialog box, in
s" folder. Windows users find the plug-ins in the "SYSTEM" subdirectory in the FileMaker Pro 4.0 directory. This bug is fixed in version 4.0v2 and higher.
What Troi File Plug-in can do for you:
File Manipulation
This group of functions makes it possible to save the contents of a (text)field or global to a file. You may calculate a path name or let the user indicate a location on your disks through a Put (Save as...) dialog box. The reverse is also possible: have the user select a file
and read it into a field. Additional functions let you query detailed information of a file: the size on disk, creation and modification dates etc. Other manipulations include creation, deletion, copying and moving of files, and the creation of folders.
Troi File Plug-in was designed and implemented by Peter Baanen of Troi Automatisering <peter@troi.nl>. Troi FM Plug-in was designed and tested by Jean Biver of
You can also visit the Troi web site at: <http://www.troi.com/> for additional information.
Troi may also be reached by postal mail at:
Troi Automatisering
Vuurlaan 18
2408 NB Alphen a/d Rijn
The Netherlands
Fax: +31-172-470539
Where can I get the latest version and more information?
The latest versions of our software are available for downloading at our web site: <http://www.troi.com/>
Here you will also find late breaking i
nformation, company information, FileMaker tips and more. Our software will also be posted (with
a week delay) to info-mac (and its mirrors). Go to: <http://www.pht.com/info-mac> or <http://hyperarchive.lcs.mit.edu/HyperArchive.html>.
System Requirements
This software should be able to run on any machine that is able to run FileMaker Pro 4.0. Of course you need a copy of FileMaker Pro, this should be a version 4.0v1 or later. This may be the US version or any other localization.
You can try-before-you-buy. This means that you are free and invited to test the plug-in 30 days before you pay. You may also make copies of the original and complete package (including this Read Me file) and distribute it to customers, friends etc. However, you may not distribute a modified or licenced version.
Use Troi File Plug-in at your own risk:
Although Troi File Plug-in was teste
d carefully, we can not be responsible for any damages resulting from using this software. Also please try it out on a test database. Your system may be using an extension (unknown to us) that interferes with the proper functioning of Troi File Plug-in.
We like to hear feedback on the benefits and shortcomings of the plug-in. Please include the platform and operating system in your suggestions and comments.
What are the costs?
Troi Dialog plug-in, Troi File plug-in and Troi Coding plug-in
can be purchased separate or at a discount in a bundle of 3 plug-ins. This is the pricing:
dialog file coding 3 FM plug-in
plug-in plug-in plug-in bundle
1 Single user license: $ 20 $ 20 $ 20 $ 40
2 or more single user licenses (per user): $ 15 $ 15 $ 15 $ 30
A Site License covers all locations for your organization within a 160 kilometer radius of your site (100 miles). One big advantage of a Site License is that you do not need to keep track of how many people at your site are using the software. A World-Wide License covers all locations for your organization on the
planet earth.
All Troi Plug-in are available for Macintosh and Windows. When ordering please indicate for which platform you are ordering.
Special licences for developers of FileMaker Pro solutions are available. Also sub-licencing is possible. Please contact Troi for information about this. At this moment the plug-in does not work with the FileMaker Pro SDK version 3.0. However it works with the 4.0 Developer edition version.
How to pay?
Paying for Troi Plug-ins is simple. There are 3
ways to pay:
1) Pay via Kagi with the enclosed Register program
2) Pay via Kagi Online at <http://order.kagi.com/?5i>
3) Pay Troi Automatisering directly (only for users in the Netherlands)
1) Pay Kagi with the enclosed Register program
Kagi is a trustworthy payment service which handles payment for a lot of users and software authors . As of end of Nov 1997 Kagi already processed 338505 payments from 7000 authors.
To pay open the Register program that accompanies Troi File Plug-in. En
ter your name, your email address, and the number of single user licenses you desire for each program you wish to purchase (or Site or World-Wide licenses). Save or Copy or Print the data from the Register program and send the data and payment to Kagi. More specifics on the Register program to follow. Kagi handles my payment processing.
If paying with Credit Card or First Virtual, you can email or fax the data to Kagi. Their email address is sales@kagi.com and their fax number is +1 510
652-6589. You can either Copy the data from Register and paste into the body of an email message or you can Save the data to a file and you can attach that file to an email message. There is no need to compress the data file, it's already pretty small. If you have a fax modem, just Print the data to the Kagi fax number.
Payments sent via email are processed within 3 to 4 days. You will receive an email acknowledgment when it is processed. Payments sent via fax take up to 10 days and if y
ou provide a correct internet email address you will receive an email acknowledgment.
If you are paying with Cash or USD Check you should print the data using the Register application and send it to the address shown on the form, which is:
1442-A Walnut Street #392-5I
Berkeley, California 94709-1405
You can pay with a wide variety of cash from different countries but at present if you pay via check, it must be a check drawn in US Dollars. Kagi cannot accept checks in other cu
rrencies, the conversion rate for non-USD checks is around USD 15 per check and that is just not practical.
If you have a purchasing department, you can enter all the data into the Register program and then select Invoice as your payment method. Print three copies of the form and send it to your accounts payable people. You might want to highlight the line that mentions that they must include a copy of the form with their payment. Kagi can not invoice your company, you need to act on my
behalf and generate the invoice and handle all the paperwork on your end.
Please do not fax or email payment forms that indicate Cash, Check or Invoice as the payment method. As far as we know, there is still no technology to transfer physical objects via fax or email and without the payment, the form cannot be processed.
Payments sent via postal mail take time to reach Kagi and then up to 10 days for processing. Again, if you include a correct email address, you will hear from Kagi whe
n the form is processed.
2) Pay via Kagi Online
See under 1) for a description of what Kagi payment service is.
Kagi has a web page where you can pay via Credit Card. Point your web browser at <http://order.kagi.com/?5i> Fill in the form and follow the instructions.
3) Pay Troi Automatisering directly
(only for users in The Netherlands)
Please use option 1 or 2 (Pay Kagi) if you live outside the Netherlands.
But if you live in The Netherlands you can pay as follows:
Troi Dialog plug-
in, Troi File plug-in and Troi Coding plug-in can be purchased separate or at a discount in a bundle of 3 plug-ins. This is the pricing:
dialog file coding 3 FM plug-in
plug-in plug-in plug-in bundle
1 Single user license: fl. 40 fl. 40 fl. 40 fl. 80
2 or more single user licenses (per user): fl. 30 fl. 30 fl. 30 fl. 60
Site license:
fl.400 fl.400 fl.200 fl. 800
World-wide license: fl.800 fl.800 fl.800 fl.1800
Developer distribution license: fl.340 fl.340 fl.340 fl. 750
Please pay the appropriate amount to:
Bank Name: Postbank NV, Amsterdam
Postgiro Account number: 72.29.209
Troi Automatisering
Vuurlaan 18
2408 NB Alphen a/d Rijn
The Netherlands
To indicate for which software you are paying, add a remark like this:
Troi F
ile Plug-in Macintosh x number of copies
and/or
Troi File Plug-in Windows x number of copies
Please e-mail your payment details as well.
Protection and Unlocking the application
Troi File Plug-in has a protection scheme. After you pay Troi Automatisering will tell you how to indicate to Troi File Plug-in that you have paid the licence fee.
If you do not have an e-mail address, please enter your complete postal address and remember, we do not know what country you live in so please e
nter that into the postal address also.
After you've supplied the payment data the following is changed:
- the
unlicenced
warning is replaced by your name.
- the flash screen that shows at the first time the plug-in is used is removed. Of course also the delay (which is longer after 30 days of use) will be removed.
If you find a bug, please report this by e-mail: peter@troi.nl. If you have any
comments or other functions that you think need to be added, please notify us! We have a lot of ideas for this plug-in, so be sure to check our web site for new plug-ins and improved versions.
And please pay for software you keep using, so that the wish list gets reality.
Versions
1.2.1 (10-Jan-99)
- added a built-in 'register function' for developers of runtimes.
- added the multi-import sample.
- fixed a bug with CreateFile on Windows. If the file exists the CreateFile now returns erro
r code $$-48 (Duplicate FileName). In this situation also on Mac $$-48 is returned (was $$-1)
- added more example files (multi-image import multi HTML export)
1.2 (03-Jul-98)
- clearer errorcodes returned by TrFile-Launch function.
- added TrFile-FolderList function
- added TrFile-Launch function
- removed the startup flash screen. Now a flash screen is shown the first time the plug-in functionality is used.
This flash screen is removed after payment of the licence fee.
- added example
demonstrating Multiple import and export.
- added example demonstrating Multiple creation using PDFWriter.
- improved handling of FSSpec to FullPath.
1.1 (29-4-98)
- added create folder
- added find folder
- added file copy and move
- file copy now returns an errorcode if destination file exists
- added partial read and appendToFile
- added Multiple file export demonstration
- split into 3 separate plugins: Troi Dialog Plug-in, Troi Coding Plug-in and Troi File Plug-in
1.0 (29-1-98) Fir`
st release
- fixed a bug on 68k machines which disposed of a pointer improperly.
Thanks for supporting our software,
Peter Baanen
mirrors). Go to: <http://www.pht.com/info-mac> or <http://hyperarchive.lcs.mit.edu/HyperArchive.html>.
System Requirements
This software should be able to run on any machine that is able to run FileMaker Pro 4.0. Of course you need a copy of FileMaker Pro, this should be a version 4.0v1 or later. This may be the US version or any other localizati
e them.
You may want to install other plug-ins before proceeding. Then (re)start FileMaker Pro. The Troi
File Plug-in will display a dialog box, indicating that it is loading and showing the registration
status. You can now open the file "File Example.fp3" to see how to use the plug-in's functions.
There is also a Function overview in this file.
UPGRADING FROM TROI
FM PLUG-IN 1.0
Current licenced users of our Troi FM Plug-in 1.0 can upgrade for free to the 3 replacing plug-ins:
Troi Dialog Plug-in 1.2.1, Troi File Plug-in 1.2.1 and Troi Coding Plug-in 1.2. These 3 new plug-ins will
recognize the payment data of Troi FM Plug-in 1.0.
-For Macintosh: remove the "Troi FM Plug-in" file from the "FileMaker Extensions" folder. Put the
file "Troi File Plug-in" from the folder "MacOS Plug-in" into the "FileMaker Extensions"
folder in th
To MenuE
PrintF
Troi File Plug-in Read Me
To MenuE
PrintF
Troi File Plug-in Read Me
To MenuE
PrintF
Troi File Plug-in Read Me
r Pro 4 folder. If you have installed previous versions of this plug-in, you must
remove them.
-For Windows: remove the "Troi FM Plug-in" file from the "SYSTEM" subdirectory in the
FileMaker Pro 4.0 directory. Put the file "trfile.fmx" from the directory "Windows Plug-in" into
the "SYSTEM" subdirectory in the FileMaker Pro 4.0 directory . If you have installed previous
versions of this plug-in, you must remove them.
You may want to install other plug-ins before proce
eding. Then (re)start FileMaker Pro. The Troi
File Plug-in will display a dialog box, indicating that it is loading and showing the registration
status.
IMPORTANT:
- Please make sure you remove "Troi FM Plug-in" file in order to be able to use the new features.
- Also please change your test script for the presence of the plug-in.
Instead of the following test:
If [ Left(External("Troi-Version"; "") ; 15 ) <> "Troi FM Plug-in"]
Beep
Namee
Parametersf
Descriptiong
Wini!
1997, 1998, Troi Automatiseringl
Added in
Version
I Troi File Plug-in Function SpecsQ
OverviewW
FunctionZ
Print`
N.A. = Not Applicable
File Copy And MoveB
Thanks for helping out!Q
to menu`
go to: www.troi.com
%AnJean Biver
Atelier Informatique
33, rue Mathias Cungs
L-3446 Dudelange
Luxembourg
mailto:biver@compuserve.com
f/Troi really appreciates the inspiring ideas of:
source FileSpec
File Copy and Move
q File Copy
r File Move
destination FileSpec
result
wA>Warning:
This is a powerful feature. Be careful what you do!
x<returns 0 if ok
returns $$+errorcode if something went wrong
To Menu
Multi Export with Filenames
FMP 4.0 Bug warningB
TrFile-Launchf
(of a folder (directory).
Parameter 1: switches: this can be one or more of the following:
files list all files in this folder
folders list all folders (subdirectories) in this folder
showaliases list all aliases (shortcuts) in this folder
showshortcuts list all aliases (shortcuts) in this folder (you can use the one you like)
showinvisibles list all invisible files and folders
showpointdirs windows: list also the directories . (current dir) and .. (parent dir)
showpointdB
irs mac: this switch is ignored
Parameter 2: FileSpec : the path to the folder to list.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a folder.
O& Og
switches | FileSpecj
Filesn
565,037997236959u
TrFile-Launchf
I Troi File Plug-in Function SpecsQ
OverviewW
FunctionZ
Print`
N.A. = Not Applicable
Namee
Parametersf
Descriptiong
Wini!
1997, 1998, Troi Automatiseringl
Categoryn
Function
InVersionx
FunctionID
Append To FileB
To MenuE
PrintF
FM Plug-in Bug warning
Warning:
There is a problem in Filemaker 4.0v1. Please make sure that all plug-ins are enabled in the preferences. (Under Edit/ Preferences/ Application/ Plug-ins). Remove plug-ins you don't use from the "FileMaker Extensions" (Mac) folder or
SYSTEM
directory (Win).
Folder ManipulationB
theFileSpec|
FileName
AppendToFile
To Menu
Specify The File
Append a line
gErrorCode
LaunchB
theFileSpec|
Folder Name
Folder Manipulation
To Menu
Folder Creation
Find Folder
error code
PRFolders is a Macintosh term. On Windows the term (sub)directory
is used for this.
theFileSpec|
Folder Name
Folder Manipulation
To Menu
Folder Creation
Find Folder
error code
PQFolders is a Macintosh term. On Windows the term (sub)directory
is usedfor this.
Imports the file specified by the FileSpec into a specified FileMaker text field. Carriage returns are converted from ASCII13 to ASCII11. Files longer than 64000 bytes are cut after the 64000th character. No provision is made for converting Unix or DOS line-breaks. Formatting is not preserved.
Set Field[MyTextField, External(Troi-getContents, "HD Mac:Text files:My Letter")] returns the contents of the file.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
The parameterB9 adds a prompt to the GetFile Dialog. It may be omitted.
promptj
Filesn
4,88302856911115u
TrFile-GetFileSizef
Returns the file size for the file specified by the FileSpec. The size indicates the number of sectors used by the file on disk, not the actual file size.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
991,495587393407u
TrFile-GetDataSizef
To be able to specify a file the plug-in uses a FileSpec, which is short for File Specification. On Windows this is always a full path like:
"C:\Data Files\Database\Test.Txt".
On Macintosh the file spec can be a full path or it can be a FSSpec:
"Mac HD:Data Files:Database:testfile"
":volumeID:directoryID:fileName"
The plug-in recognises the FSSpec by the colon as the first character.
An example may be: ":-1:300:testfile".
On the Mac a volume name need not be unique, be B
careful with that.
Filesn
931,353786462617u
TrFile-ContentsDialogf
}Returns the file type for the file specified by the FileSpec. The file type is a 4 character code used to designate the type of file. For example: FileMaker files have a file Type of
and Applications have types of
This function is not available in Windows. Windows uses the .3 extension instead.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
738,120568328593u
TrFile-GetFileCreatorf
tReturns the file creator for the file specified by the FileSpec. The file creator is a 4 character code used to designate the application that created a file. For example: FileMaker creates files
and Applications have creator equal to their file type.
This function is not available in Windows.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
71,6187036929739u
TrFile-GetDateCreatedf
7Returns the data size for the file specified by the FileSpec. The size indicates the actual number of bytes used by the data fork.
In Windows this function returns the actual file size in bytes, since there are no resource forks in Windows.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
113,101148564881u
TrFile-GetResForkSizef
Returns the size of the resource fork for the file specified by the FileSpec. The size indicates the actual number of bytes used by the resource fork.
This function is not available in Windows.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
69,1358200596347u
TrFile-GetFileTypef
Returns the creation date for the file specified by the FileSpec.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
442,203231827451u
TrFile-GetTimeCreatedf
Returns the creation time for the file specified by the FileSpec.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
19,0638215369842u
TrFile-GetDateTimeCreatedf
Returns the creation date and time for the file specified by the FileSpec.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
735,551177866548u
TrFile-GetDateModifiedf
Returns the modification date for the file specified by the FileSpec. The modification date is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
FileSpecj
Filesn
592,39189866576u
TrFile-GetDateCreatedf
trfile-getfilecreato
trfile-getfilesize
trfile-getfiletype
trfile-getresforksiz
trfile-gettimecreate
trfile-gettimemodifi
trfile-launch
trfile-movefile
trfile-saveX
trfile-save
filespec
dialogX
trfile-search
trfile-setcontents
trfile-setdefaultcre
trfile-setdefaultfil
trfile-setdefaulttyp
trfile-version
troi-setp
troi-set
default
separatorq
troi-set
separator
oncep
filetype1filetype2fi
folderconstant
nameX
prompt
prompt
default
nameX
separator
sourcel
source
filespec
destination
filespecl
switchesr
switches
filespecr
files
general
&File Manipulation: Full Path to FSSpec
File Manip: Filtering Files
File Manip: Copy a file
TrFile-GetTimeModifiedf
Returns the modification date for the file specified by the FileSpec. The modification date is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
592,39189866576u
TrFile-GetTimeModifiedf
1the FileSpec. The modification date is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
592,39189866576u
TrFile-GetTimeModifiedf
1 The modification date is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
592,39189866576u
TrFile-GetTimeModifiedf
1o displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
592,39189866576u
TrFile-GetTimeModifiedf
Returns the modification time for the file specified by the FileSpec. The modification time is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
891,003929959146u
TrFile-GetDateTimeModifiedf
Returns the modification date and time for the file specified by the FileSpec. The modification date and time are also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.i
FileSpecj
Filesn
508,366341473705u
TrFile-Save FileSpec Dialogf
[Presents the user with a standard save dialog and displays all files in a directory. The prompt will be displayed inside a PutFile dialog to inform the user what to do. A default file name may be indicated. The function returns an FileSpec which can be used to create and write to the file.
If the user cancels an error code of "$$-1" is returned.
prompt|default_file_name
Filesn
44,2296616007712u
TrFile-CreateFilef
Creates a new empty file in the location indicated by the FileSpec. This function requires no user intervention.
An error code of $$-1 means the file already exists.
See also the function "TrFile-Save FileSpec Dialog" to get a FileSpec for the file, "TrFile-SetContents" to set the contents of the file, "TrFile-SetDefaultCreator" and "TrFile-SetDefaultType" to set the file type and creator on Mac.
FileSpecj
Filesn
774,086341156664u
TrFile-SetContentsf
Sets the contents of an existing file indicated by the
SetDefaultFileSpec
function.
An error code of $$-1 means that no file exists.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for the file,
SetDefaultFileSpec
to indicate the file to affect,
TrFile-CreateFile
to create a new empty file, "TrFile-SetDefaultCreator" and "TrFile-SetDefaultType" to set the file type and creator on Mac.
FileSpecj
Filesn
565,037997236959u
TrFile-DeleteFilef
,Deletes the file indicated by the FileSpec. This function requires no user intervention.
An error code of $$-1 means there is no file by that name.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec for the file, and
Troi-DoDialog
Display Dialog
script step to warn the user.
FileSpecj
Filesn
,90326089454035u
TrFile-SetDefaultFileSpecf
Indicates a FileSpec (i.e. the file) to be used in succeeding functions where no FileSpec is indicated.
See also the functions "TrFile-SetFileContents" and "TrFile-FileSpec To FullPath" to revert the path name.i
FileSpecj
Filesn
375,261820096179u
TrFile-SetDefaultCreatorf
Specifies the file creator to be used when creating a new file. This creator will be used for subsequent calls to "TrFile-CreateFile".
See also the function "TrFile-CreateFile" to create a new empty file.i
FileSpecj
Filesn
217,251061563031u
TrFile-SetDefaultTypef
Sets the file type to be displayed when browsing GetFile dialogs. If no parameter is specified, the GetFile dialog in the new function will display all files. Individual file type must contain 4 characters and are case sensitive. Add more file types without separators.
Also sets the default file type when creating new files.
Example: Set Field[gButtonNr, External(TrFile-SetDefaultType, "TEXTttro") to display SimpleText and Teach Text read-only files.
See also the functions
TrFile-Get FilB)eSpec Dialog
and "TrFile-ContentsDialog"
i&[FileType1FileType2FileType3FileType4]j
Filesn
89,5969276733682u
TrFile-FileSpec To FullPathf
Changes the relative file path to the full path name displaying all folder names in the path.
See also the function
TrFile-FullPath To FileSpec
to revert the path name.i
FileSpecj
Filesn
51,6646984273869u
TrFile-FullPath To FileSpecf
Changes the full name path to the standard Macintosh FSSpec.
This is formatted as follows: ":volumeID:folderID:FileName". This is the preferred way on the Mac to specify a file.
See also the function "TrFile-FileSpec To FullPath" to revert the path name.i
FileSpecj
Filesn
428,119778832476u
TrFile-AppendContentsf
Append to the contents of an existing file indicated by the
SetDefaultFileSpec
function.
Parameter: text to be added to the default file.
An error code of $$-1 means that no file exists.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for the file,
SetDefaultFileSpec
to indicate the file to affect,
TrFile-CreateFile
to create a new empty file, "TrFile-SetDefaultCreator" and "TrFile-SetDefaultType" to set the file type and creator on Mac.
textj
Filesn
565,037997236959u
TrFile-CopyFilef
Copies a file.
Parameters: source FileSpec : the path to the file to copy.
destination FileSpec : the path to where to file must be copied to.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a file,
SetDefaultFileSpec
to indicate the file to affect,
TrFile-CreateFile
to create a new empty file, "TrFile-SetDefaultCreator" and "TrFile-SetDefaultType" to set the file type and creator on Mac.
i&source FileSpec | destination FileSpecj
Filesn
565,037997236959u
TrFile-MoveFilef
Moves a file from one disklocation to another.
Parameters: source FileSpec : the path to the file to copy.
destination FileSpec : the path to where to file must be moved to.
You can also use this function to rename a file.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a file,
SetDefaultFileSpec
to indicate the file to affect,
TrFile-CreateFile
to create a new empty file, "TrFile-SetDefaultCreator" and "TrFile-SetDefaultType" to set the file type and creatorB
on Mac.
i&source FileSpec | destination FileSpecj
Filesn
565,037997236959u
TrFile-CreateFolderf
Creates a new (empty) folder (subdirectory).
Parameters: FileSpec : the path to the folder to create.
You can also use this function to rename a file.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a folder
TrFile-CreateFile
to create a new empty file.
FileSpecj
Filesn
565,037997236959u
TrFile-FindFolderf
Finds special folders (subdirectories).
Parameters: folderconstant : must be one of the following:
desktop = desktop folder
system = system folder
trash = trash folder on the desktop
shutdown = shutdown items folder in the system folder
applemenu = apple menu folder in the system folder
controlpanels = control panels folder in the system folder
extensions = extensions folder in the system folder
preferences = preferences folder in the system folder
temporary = hidden temporary foldBder on the startup disk
root = top folder on the startup disk
returns: the Filespec of the folder.
folderconstantj
Filesn
565,037997236959u
Troi-Set Separator Oncef
Changes the default separator text to the given separator, for ONE Troi FM Plug-in function only. After the function has been called the separator will revert to the default separator.
The separator text is used by the plug-in to split one parameter into multiple parts. At FileMaker startup the separator text defaults to "|". Use this function if you want to specify a parameter part which has the current separator in it.
Example usage: Set Field[gDontCare, External(Troi-Set Separator OnceB
, "<->")]
i separatorj
Generaln
66,3373209844983u
Troi-Set Default Separatorf
Changes the default separator text to the given separator. The new separator will be used until FileMaker is quit or an other separator is specified.
The separator text is used by the plug-in to split one parameter into multiple parts. At FileMaker startup the separator text defaults to "|". Use this function if you want to specify a parameter part which has the current separator in it.
Example usage: Set Field[gDontCare, External(Troi-Set Default Separator, "<->")]
Tip: specify a separaB(tor you know won't be in any parameters.
i separatorj
Generaln
,78354403413065u
TrFile-FolderListf
3List the content of a folder (directory).
Parameters: switches:
FileSpec : the path to the folder to list.
You can also use this function to rename a file.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a folder
TrFile-CreateFile
to create a new empty file.
switches | FileSpecj
Filesn
565,037997236959u
Helvetica
Geneva
Arial
Times New Roman
Monaco
Courier
Times
Futura
Courier New
Palatino
A Open file
) = 2
!A File Manipulation: Simple Dialog
Cancel
"You can import a TEXT file in one step using the function:
External ("TrFile-GetFileContents" ; "<prompt>")
The following dialog lets you select a file.BN
|("TrFile-ContentsDialog"
TrFile-ContentsDialog
"A&File Manipulation: FSSpec to Full Path
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
#A&File Manipulation: Full Path to FSSpec
A File Manipulation: Use File Spec
Cancel
To get the File Specification of any file, use the function:
A4Important: ALWAYS check if the plug-in is available!B)Check if this is FileMaker 4.0 or higher.CQ
1)) < 4
Canceld
This file requires FileMaker 4.0 or higherE/Check if the correct Troi Plug-in is available.F
|("TrFile-Version"
"")
17 ) <> "Troi File Plug-in"
TrFile-Version
Troi File Plug-in
) = 1
Canceld
Troi File Plug-in not found. Please put the Troi File Plug-in into the Extensions folder inside the FileMaker folder.
Also enable all the plug-ins under the application preferences.
Canceld
Troi File Plug-in not found. Please put the Troi File Plug-in into the SYSTEM directory inside the FileMaker directory.
Also enable all the plug-ins under the application preferences.
= ""
Cancel
Specify a File first.D
|("TrFile-AppendContents"
"This part was written at: " &
)) &
TrFile-AppendContents
This part was written at:
<> 0
Cancel
An error occurred.
VA!File Manip: GoTo Append to a file
WA'TEST LOOP: File Manip: Append to a file
d puts this on the desktop
|("TrFile-CreateFile"
TrFile-CreateFile
H$File was created ok. (errorcode = 0)I
OK8C4 Title
WORF
Cancel FMP3 dW data #259072
2 Title_fp3- WORF The empty file was created. Add lines to it by clicking on the "Append a line" button.J
OK8C4 Title
WORF
Cancel FMP3 dW data #259072
2 Title_fp3- WORF The file could not be created, it might already exists. Be sure you want to append to this file.Kd
|("Troi-DoDialog"
"You pressed cancel.")
Troi-DoDialog
You pressed cancel.|
File Manip: Append to a file
A+Specify a file and puts this on the desktop
A+Specify a file and puts this on the desktopB
|("TrFile-Save FileSpec Dialog"
"Where should I create a file?|DemoFile.fp3")
TrFile-Save FileSpec Dialog
*Where should I create a file?|DemoFile.fp3|C;
2 )
"$$"
|("TrFile-SetDefaultFileSpec"
TrFile-SetDefaultFileSpec
|("TrFile-SetDefaultCreator"
"FMP3")
TrFile-SetDefaultCreator
FMP3|FV
|("TrFile-SetDefaultType"
"FMP3")
TrFile-SetDefaultType
FMP3|GJ
|("TrFile-CreateFile"
TrFile-CreateFile
I$File was created ok. (errorcode = 0)JK
|("TrFile-SetContents"
TrFile-SetContents
|("Troi-Set Default Separator"
"|")
Troi-Set Default Separator
folder path
FolderList (using a script)
To Menu
s$switches, determining what is listed
uDthese 2 switches have the same effect:
show also aliases (shortcuts)
list all files
w%show also invisible files and folders
x)(Win only) show also directories . and ..
list all folders (directories)
command used
|A8terminology:
Mac Windows
folder directory
alias shortcut
gFolderList
Get FolderList
To Field Version
2) Click Here
#1) Type a full path
+ set switchesV
W$switches, determining what is listed|
folder path
FolderList (using a script)
To Menu
command used
http://www.troi.com/
Button 2
Clear File Spec
Cancel
Maximize
OKncel
PageDo you want to erase all file spec information?B+
) = 2
Quit button dialog
|("Troi-Version"
"")
15 ) = "Troi FM Plug-in"
Troi-Version
Troi FM Plug-in
A Full PathB
BooleanC
TEST Cond value (does not work)D
CategoriesE TEST Cond value2 (does not work)G
Folder List SwitchesI
Search Switches
|("TrFile-Get FileSpec Dialog"
"Please select a file first:")
TrFile-Get FileSpec Dialog
Please select a file first:|B;
2 )
"$$"
OKsrc #28
2808 Web Compani
Cancel WORF FMXT dw da
a #334062
2866 Web Companion First we read from the 5th character, with a length of 6 characters.D_
|("TrFile-GetContents"
& "|5 |6 ")
TrFile-GetContents
|5 |6
OKsrc #28
2808 Web Compani
Cancel WORF FMXT dw da
a #334062
2866 Web Companion Now we read 30 characters from the 10th character.F_
|("TrFile-GetContents"
& "|10|30")
TrFile-GetContents
|10|30
OKsrc #28
2808 Web Compani
Cancel WORF FMXT dw da
a #334062
2866 Web Companion Now we read all from the 10th character.H]
|("TrFile-GetContents"
& "|10|0")
TrFile-GetContents
|10|0
trfile-getfilecreato@
FPTHA
MSPC@
NAMEA
RPTH@
FPTH@
MSPC@
NAMEA
RPTH@
FPTH@
alisA
LISTA
All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himself Peter peters. All by himselfby himselfeters. All by himselfeters. All by himselfimselfimselfby himselfby himselfby himselfelfimselfimselfs. All by himself
textB
gNumberB
gVersionB
|("TrFile-Version"
TrFile-Version
gTheFile
Troi File Plug-in
Troi File Plug-in is copyright 1998, 1999 of Troi Automatisering. All rights reserved (10-Jan-99).
Thank you for your interest in Troi File Plug-in. This FileMaker Pro 4 plug-in adds File Manipulation: save or read a field from or to a file. Other manipulations like deleting files, creating folders are also possible.
This cross-platform plug-in enhances Filemaker Pro 4. Finally you can do things you thought were still impossible to do with FileMaker 4. Now you can crea
te powerful databases by using this plug-in!
INSTALLATION INSTRUCTIONS
INSTALLING A (TROI) PLUG-IN FOR THE FIRST TIME.
-For Macintosh: put the file "Troi File Plug-in" from the folder "MacOS Plug-in" into the
"FileMaker Extensions" folder in the FileMaker Pro 4 folder. If you have installed previous
versions of this plug-in, you must remove them.
-For Windows: put the file "troiplug.fmx" from the directory "Windows Plug-in" into the
"SYSTEM" subdirectory in the File
|("TrFile-Save FileSpec Dialog"
"Where should I create a folder?|DemoFolder")
TrFile-Save FileSpec Dialog
*Where should I create a folder?|DemoFolder|C;
2 )
"$$"
|("TrFile-CreateFolder"
TrFile-CreateFolder
F$File was created ok. (errorcode = 0)G}
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe folder was created.H
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe folder was could not be created.
Check if it already exists.Id
|("Troi-DoDialog"
"You pressed cancel.")
Troi-DoDialog
You pressed cancel.|
dA+Folder Manip: Create a File with FindFolder
) = 1
B8if on Mac add a colon ":" to the full path, if not thereC^
1) <> ":"
D8if on Win add a colon "\" to the full path, if not thereE^
1) <> "\"
To Multi export
Import Image Data
imp: Do Multi Image Import
A-Specify a folder and puts this on the desktop
OK
pRF FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataYou can find special folders (directories) by using the function: "TrFile-FindFolder". You can find the system folder, preferences folder, root folder and others. In this example we first find the Desktop Folder.CT
|("TrFile-FindFolder"
"desktop")
TrFile-FindFolder
desktop|D;
2 )
"$$"
F FNDR dw
Cancel631000
1DC0 Apple Guide
WORF INIT dw dataThe (empty) file "demofile.txt" could not be created on the desktop.
There is a problem in FileMaker 4.0v1. Please make sure that all plug-ins that are in the folder "FileMaker Extensions" are enabled in the preferences (Under Edit/ Preferences/ Application/ Plug-ins). Make sure all plug-ins have a cross before their name. Remove plug-ins you don't use from the "FileMaker Extension
}`} }`}
~`~@~`~@
~@~`~@~`
} }`} }`
}`} }`}
~`~@~`~@~`~@
~@~`~@~`~@~`
} }`} }`
A(gNumber has the repetition number in it.B
are we ready?D%
H >=
no: tab to the next repetitionF
increase the numberG'
H + 1
Imp: Locate import file
A"set no filtering of visible files:BN
|("TrFile-SetDefaultType"
TrFile-SetDefaultType
|("TrFile-Get FileSpec Dialog"
"Find the import file")
TrFile-Get FileSpec Dialog
Find the import file|D]
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
Imp: Locate first image
hK)[a`
VAt?z
aryZ~\v
Search a volume (disk) for a file or folder (directory).
Parameter 1: switches: this can be one or more of the following:
files search for files
folders search for folders
exactname the filename must exactly match the searchname
showaliases search also aliases (shortcuts)
showshortcuts search also aliases (shortcuts) (you can use the one you like)
showinvisibles search also invisible files and folders
Parameter 2: Volume : the name of the volume on which to search
Parameter 3: SeB
archName : the (part of the) filename or foldername you want to find
BExample usage: External(TrFile-Version, "") will return "Troi File Plug-in 1.0".
Important: always use this function to determine if the plug-in is loaded. If the plug-in is not loaded use of external functions may result in data loss, as FileMaker will return an empty field to any external function that is not loaded.
nonej
Filesn
About FileSpec
FolderList
O = ""
Cancel
Please select a folder to list first.C_
|("TrFile-ListFolder"
K & "|" &
TrFile-ListFolder
FolderList (Select Folder)
|("TrFile-FindFolder"
"root")
TrFile-FindFolder
root|B]
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
A To FolderList (Scripted Version)
errors.
Open file
Set all globals
To Menu
Quit button dialog
----- General ------
Check FILE plug-in
Check for NO Troi FM plug-in
----- File Manipulation ------
File Manipulation: Simple Dialog
File Manipulation: Use File Spec
.File Manipulation: Get File Contents & Details
File Manipulation: Create a file
File Manipulation: Delete a file
,File Manipulation: Toggle FSSpec / Full Path
&File Manipulation: FSSpec to Full Path
&File Manipulation: Full Path to FSSpec
File Manip: Filtering Files
File Manip: Copy a file
File Manip: Move a file
&!File Manip: GoTo Append to a file
($File Manip: Append to a file (start)
File Manip: Append to a file
,%File Manip: Partial Get File Contents
Folder Manip: Create a Folder
0+Folder Manip: Create a File with FindFolder
Clear File Spec
To Multi export
----- Multi Export ------
Export Data
Exp: Locate Export file
Exp: Locate destination folder
Exp: Do Multi export
"biff"
64000
-1) -1) & "biff" &
) & ".gif"
|("TrFile-DeleteFile"
TrFile-DeleteFile
|("TrFile-CopyFile"
& "|" &
TrFile-CopyFile
<> 0
Export
Cancelh
Replace
An Error occured. See the layout for an explantion of errors.G'
imp: goto right repetition
UtNOTES:
- on Windows you can also open directories.
- on Windows if the file is already open it will open it again.
Possible Returned error codes
$$-35 = No such volume (Wrong disk name or not mounted).
$$-43 = File not found.
$$-50 = Parameter error.
$$-120 = Directory not found.
Multi ExportB
want to export, run this script:
ABEE>> files are exported with the number of records in the name:
Example: EXP32.TAB
destinat. exp.filename
gErrorCode
Multi Image ImportB
ite checkbox to overwrite.
U*This technique can also be used for Importing records or images from multiple files.
How does it work?
Multi Image ImportB
Export Data
Exp: Locate Export file
|("TrFile-Get FileSpec Dialog"
"Give a file to copy")
TrFile-Get FileSpec Dialog
Give a file to copy|B]
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
Exp: Locate destination folder
Exp: Check Folder Spec
|("TrFile-Get FileSpec Dialog"
"Give a file to copy")
TrFile-Get FileSpec Dialog
Give a file to copy|B]
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
Exp: Locate destination folder
Exp: Check Folder Spec
File Manipulation: Simple Dialog
File Manipulation: Use File Spec
.File Manipulation: Get File Contents & Details
File Manipulation: Create a file
File Manipulation: Delete a file
,File Manipulation: Toggle FSSpec / Full Path
&File Manipulation: FSSpec to Full Path
&File Manipulation: Full Path to FSSpec
File Manip: Filtering Files
File Manip: Copy a file
File Manip: Move a file
&!File Manip: GoTo Append to a file
($File Manip: Append to a file (start)
File Manip: Append to a file
,%File Manip: Partial Get File Contents
Folder Manip: Create a Folder
0+Folder Manip: Create a File with FindFolder
CRECORDCOUNT
ERRORDESCRIPTIONCALC
FOLDERLISTCALC
FOLDERLISTCOUNTCALC
FUNCTIONCATEGORY
FUNCTIONDESCRIPTION
FUNCTIONID
*DESCRIPTION
FUNCTIONID
export FileSpec
Export to Multiple files*
q Export 1x
destination Folder
To Menu
step 1
Locate the Export file
step 2
This example creates an export file called
TrExport.tab
in the folder of this FMP-file. You might want to change that: it
s in the script
Export Data
!A) You have to do this only ONCE:
Please find the exported file.
Create a destination folder
step 3
TSpecify a destination folder.
You can also type in a full path to the folder below.
Do Multi Export
,B) When you want to export, run this script:
ABEE>> files are exported with the number of records in the name:
Example: EXP32.TAB
destinat. exp.filename
gErrorCode
By default files are not overwritten. Use this checkbox if you want to overwrite existing files. (See the script for how to do this with the TrFile-DeleFile function.
overwrite
Files?
TError -48 (Mac) or 80 (Win) = files exists. Set the overwrite checkbox to overwrite.
cRecordCountB
gDestExportFSSpecB
gOverwriteExpFilesB
gContainerB
gNumber2B
gImagesPathsB
gFolderListB
gFolderListSwitchesB
gFolderListCommandB
AX"External(""TrFile-ListFolder""; """ &
" &") & " |" &
O & """)"
External("TrFile-ListFolder"; "
FolderListCalcB
K <> ""
O <> ""
|("TrFile-ListFolder"
" &") & " |" &
""
TrFile-ListFolder
GFULLPATH
GIMAGESPATHS
GNUMBER
GNUMBER2
GOVERWRITEEXPFILES
GSEARCHCOMMAND
GSEARCHCOMMENTS
GSEARCHRESULTS
GSEARCHSPEC
GSEARCHSWITCHES
GSEARCHVOLUME
GTEXT
GTHECREATOR
GTHEDATASIZE
GTHEDATECREATED
GTHEDATEMODIFIED
GTHEDATETIMECREATED
GTHEDATETIMEMODIFIED
GTHEFILE
GTHEFILESIZE
GTHEFILESPEC
GTHEFILETYPE
GTHERESSIZE
GTHETIMECREATED
GTHETIMEMODIFIED
GUSERINPUT
GVERSION
GXPLATFORMRETURN
RANDOMNR
SEARCHRESULTSCOUNTCALC
gTheFile
U*This technique can also be used for Importing records or images from multiple files.
How does it work?
----- FolderList ------
To FolderList Demo
O = ""
) = 1
|("TrFile-FileSpec To FullPath"
|("TrFile-FindFolder"
"root") )
"C:"
TrFile-FileSpec To FullPath
TrFile-FindFolder
root||
A Do Search
Q = ""
Cancel
Please select a file name to search for first.C
"Searching...."
Searching....
errors.
----- File Manipulation ------
----- General ------
----- Documentation etc ------
File Manip: Copy a file
Get the source fileB~
|("TrFile-Get FileSpec Dialog"
"Give a file to copy")
TrFile-Get FileSpec Dialog
Give a file to copy|
) = 1
|("TrFile-Get FileSpec Dialog"
"Please choose a file:")
TrFile-Get FileSpec Dialog
Please choose a file:|
Cancel
The Macintosh lets you distinguish files by their file type. To list only specific files in a "TrFile-Get FileSpec Dialog" function, you can set one or more filters by using the function:
The following example lets you select a file of type 'FMP3' and 'TEXT'. If you don't see any files in the current folder, browse to a folder where you find FileMaker Pro files and/or text files.G^
|("TrFile-SetDefaultType"
"FMP3TEXT")
TrFile-SetDefaultType
FMP3TEXT|
ultType
|("TrFile-Search"
T & "|"&
U & "|" &
TrFile-Search
W > 0
"Nothing Found!")
Nothing Found!2
To Search Demo
U= ""
) = 1
|("TrFile-FileSpec To FullPath"
|("TrFile-FindFolder"
"root") )
"C:"
TrFile-FileSpec To FullPath
TrFile-FindFolder
root||
TEST Search Loop
"aa"
"bb"
"ee"
"ff")
Multi Ex-/Import ExplanationB
import
FileSpec
Import of multiple images
q Import 1x
source file
Folder
To Menu
step 1
Locate the imported file
step 2
This example imports a file called
trimport.gif
that is already in the folder of this FMP-file. You might want to change that: it
s in the script
Import Image Data
export FileSpec
Import of multiple images*
q Export 1x
destination Folder
To Menu
step 1
Locate the Export file
step 2
!A) You have to do this only ONCE:
/Please find this imported file
trimport.gif
Locate the first image
step 3
8locate the first image to import in the
folder
images
Do Multi Import
,B) When you want to import, run this script:
4 images are imported.re imported.
ilename
Example: EXP32.TAB
destinat. exp.filename
By default files are not overwritten. Use this checkbox if you want to overwrite existing files. (See the script for how to do this with the TrFile-DeleFile function.
overwrite
Files?
TError -48 (Mac) or 80 (Win) = files exists. Set the overwrite checkbox to overwrite.
U*This technique can also be used for Importing records or images from multiple files.
gContainer
gNumber
clear images
Images
Paths
How does it work?
8GE*)
|("TrFile-FullPath To FileSpec"
TrFile-FullPath To FileSpec
File Manip: Filtering Files
Cancel
You can get a "TrFile-Get FileSpec Dialog" function to display all files (No filtering).CN
|("TrFile-SetDefaultType"
TrFile-SetDefaultType
Uo Multi Image Import
imp: goto right repetition
Imp: Locate import file
Imp: Locate first image
Imp: Clear fields
----- FolderList ------
FolderList
FolderList (Select Folder)
To FolderList Demo
\ To FolderList (Scripted Version)
Launch File
Select File
----- Multi PDFs ------
To Multi PDF Printing
Print one PDF
Exp: Locate PDF file
Do Multi PDFs
----- Search ------
To Search Demo
p Do Search
----- Documentation etc ------
Print Function Specs
Copy Parameters
x WWW: Goto web site: www.troi.com
WWW: Order via web site
Print this record
BeepBeep
----- Troi Test scripts ------
TEST: FindFolder
'TEST LOOP: File Manip: Append to a file
TEST Search Loop
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaAre you sure you want to delete this file?H+
) = 1
|("TrFile-DeleteFile"
TrFile-DeleteFile
K!File was deleted. (errorcode = 0)L
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file has been deleted.M
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file ould not be deleted.N
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file was not deleted.
FileMaker has the limitation that in a script it can only export to a fixed file, or ask the user for a file name. You can not specify the file by a calculation in a script. The same limitations apply when importing records or images.
'The way around this limitation (export)
The idea is to let FileMaker do the export to a fixed file first and then copy that exported file to the desired location, giving it the wanted name at the same time. This can be done with the Troi file plug-in in a script by the following steps:
Export Records [Restore, No dialog, TrExport.tab] export to a fixed location
Set Field [gDestExportFSSpec, gTheFileSpec & "EXP" & Stat] calculate the filepath of the destination
Set Field [gErrorCode, External("TrFile-CopyFile";
gExportFSSpec & "|" &gDestExportFSSpec)] copy the file to the destination
Exit Loop If [...]
End Loop
the destination
Exit Loop If [...]
End Loop
2 ) = "$$"
|("TrFile-Save FileSpec Dialog"
"Were should I move it?")
TrFile-Save FileSpec Dialog
Were should I move it?|D;
2 ) = "$$"
|("TrFile-MoveFile"
& "|" &
TrFile-MoveFile
WWW: Order via web site
.http://order.kagi.com/cgi-bin/register1.cgi?5iP
Button 2
Print this record
BeepBeep
2 ) = "$$"
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
Get the destinationF
|("TrFile-Save FileSpec Dialog"
"Where should I save it?")
TrFile-Save FileSpec Dialog
Where should I save it?|G;
2 ) = "$$"
Here is the copying done:IZ
|("TrFile-CopyFile"
& "|" &
TrFile-CopyFile
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
File Manip: Move a file
|("TrFile-Get FileSpec Dialog"
"Give a file to copy")
TrFile-Get FileSpec Dialog
Give a file to copy|
=1000
Print one PDF
----- Multi PDFs ------
Do Multi PDFs
|("TrFile-DeleteFile"
TrFile-DeleteFile
d name at the same time. This can be done with the Troi file plug-in in a script by the following steps:
!GThe sample scripts are a bit more elaborated and do error checking etc.
hFor import the idea is this almost the same: First copy the file to be imported to a fixed file. Then let FileMaker do the import of this fixed file. This works with importing records, pictures and movies. See the sample scripts for more details. One limitation remains: at this moment we know of no way to do a multi-import of pictures by storing a reference.
#'The way around this limitation (import)
To Menu
to multi export
to multi import
Multi Image Import CopyB
+A,File Manipulation: Toggle FSSpec / Full Path
" = ""
"Full Path"
Full PathC
,A WWW: Goto web site: www.troi.com
Cancel
Do you want to connect to Troi's web site?B+
) = 1
Cancel
Do you want to connect to Troi's web site?B+
) = 1
|("TrFile-GetDateTimeModified"
TrFile-GetDateTimeModified
TrFile-GetContents
OKsrc #28
2808 Web Compani
Cancel WORF FMXT dw da
a #334062
2866 Web Companion If you read from beyond the end of the file errorcode $$-39 is returned.Jg
|("TrFile-GetContents"
& "|200000|10")
TrFile-GetContents
|200000|10
OKsrc #28
2808 Web Compani
Cancel WORF FMXT dw da
a #334062
2866 Web Companion You pressed cancel.
When you cancel a result ""$$-1"" is returned. In your scripts you should test for this result.
that is already in the folder of this FMP-file. You might want to change that: it
s in the script
Import Image Data
!A) You have to do this only ONCE:
/Please find this imported file
trimport.gif
Locate the first image
step 3
8locate the first image to import in the
folder
images
Do Multi Import
,B) When you want to import, run this script:
4 images are imported.
clear images
Images
Paths
How does it work?
FolderListB
Multi PDF PrintB
Directory not found.
3) Set switches
1) Select the disk to search
Multi PDF PrintB
W$switches, determining what is listed|
folder path
@A$FolderList (using field calculation)
To Menu
K(below the command used to get this list:
NEW in 1.2
Type a full path
PA8terminology:
Mac Windows
folder directory
alias shortcut
FolderList calculation
# of items found
]Dthese 2 switches have the same effect:
show also aliases (shortcuts)
list all files
_%show also invisible files and folders
`FWindows: show also directories . and ..
Mac OS: this switch is ignored
list all folders (directories)
Change switches
To Scripted Version
FolderList scriptedB
Open a file with the program that has registered it.
Parameter: FileSpec : the path to the file to launch.
On the Mac the program that opens it is determined by the Filetype of the file. On windows this is determined by the extension of the file. So a text file "ReadMe.txt" will usually be opened by SimpleText (Mac) or WordPad (Windows).
Example: a pdf file "userguide.pdf" will be opened by Acrobat reader.
Example 2: this will open a file in MS Word:
External ("TrFile-Launch" ; C:\EB
XAMPLE\README.WRD")
Possible Returned error codes:
$$-35 = No such volume (Wrong disk name or not mounted).
$$-43 = File not found.
$$-50 = Parameter error.
$$-120 = Directory not found.
FileSpecj
Filesn
565,037997236959u
TrFile-Searchf
565,037997236959u
|("TrFile-SetDefaultType"
"PDF ")
TrFile-SetDefaultType
PDF |B
|("TrFile-Get FileSpec Dialog"
"Locate the Printed PDF")
TrFile-Get FileSpec Dialog
Locate the Printed PDF|C;
2) <> "$$"
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
Cancel
The next step will delete the just selected PDF file This is needed for the multi printing to work. Do you want to delete it?F*
) =2
|("TrFile-DeleteFile"
TrFile-DeleteFile
To Multi PDF Printing
----- Troi Test scripts ------
----- Search ------
To Multi Import v2
the FileSpec
Launch
To Menu
1-Select File
2-Launch it!
returned ErrorCode
With this function you can open files in the the application that has registered it.
Example1:
a text file "ReadMe.txt" will be opened by WordPad (Win) or SimpleText (Mac)
Example2:
a pdf file "userguide.pdf" will be opened by Acrobat reader.
1-Select File
2-Launch it!
returned ErrorCode
With this function you can open files in the the application that has registered it.
Example1:
a text file "ReadMe.txt" will be opened by WordPad (Win) or SimpleText (Mac)
Example2:
a pdf file "userguide.pdf" will be opened by Acrobat reader.
- on Windows you can also open directories.
- on Windows if the file is already open it will open it again.
A+Specify a file and puts this on the desktopBN
|("TrFile-SetDefaultType"
TrFile-SetDefaultType
|("TrFile-Get FileSpec Dialog"
"Select a file to DELETE
WARNING: Deletion cannot be undone.")
TrFile-Get FileSpec Dialog
;Select a file to DELETE
WARNING: Deletion cannot be undone.|D;
2 ) = "$$"
User pressed cancelF|
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaDeletion was canceled.
SearchB
erminology:
Mac Windows
folder directory
alias shortcut
z Search Results (<<
ABFH>> found)
LISTAFfiles
folders
exactname
showaliases
showshortcuts
showinvisibles
VDEFA(
gSearchSwitchesB
gSearchVolumeB
SearchResultsCountCalcB
gSearchCommentsB
External("TrFile-Search"; "
Set all globals
TrFile-DeleteFile
K!File was deleted. (errorcode = 0)L
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file has been deleted.M
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file ould not be deleted.N
OKns of thi
Pug-in, you must re
Cancelem.
(Re)start FileMaker Pr
. The Troi FM plug-in will displaThe file was not deleted.
Set all globals
search for files with name
Search
To Menu
o$switches, determining what is listed
qDthese 2 switches have the same effect:
show also aliases (shortcuts)
list all files
s%show also invisible files and folders
search for the exact filename
list all folders (directories)
command used
xA8terminology:
Mac Windows
folder directory
alias shortcut
z Search Results (<<
ABFH>> found)
B'Select just 10 records to start with...C"Now we loop to do the multi exportDH
& "Demo" &
) & ".PDF"
F = "Yes"
|("TrFile-DeleteFile"
TrFile-DeleteFile
|("TrFile-MoveFile"
C & "|" &
TrFile-MoveFile
<> 0
Export
Cancelh
Replace
An Error occured. See the layout for an explantion of errors.J+
) = 1
Exp: Locate PDF file
ges from multiple files.
PDF FileSpec
Print to Multiple PDFs
Print 1x
destination Folder
To Menu
step 1
Locate the Printed file
step 2
You need PDFWriter as printer installed. If so this example creates an pdf file called
untitled
on the desktop folder. The script doing this is called
Print one PDF"
!A) You have to do this only ONCE:
Please find the PDF file.
Create a destination folder
step 3
TSpecify a destination folder.
You can also type in a full path to the folder below.
Do Multi PDFs
,B) When you want to export, run this script:
T10 PDF files are printed with the number of records in the name:
Example: Demo32.PDF
destinat. exp.filename
gErrorCode
By default files are not overwritten. Use this checkbox if you want to overwrite existing files. (See the script for how to do this with the TrFile-DeleFile function.
overwrite
Files?
TError -48 (Mac) or 80 (Win) = files exists. Set the overwrite checkbox to overwrite.
ges from multiple files.
U*This technique can also be used for Importing records or images from multiple files.
How does it work?
|("TrFile-Get FileSpec Dialog"
"Select a FileMaker file or a TEXT file:")
TrFile-Get FileSpec Dialog
'Select a FileMaker file or a TEXT file:|I
Reset the default type. JOIf not specified the type 'TEXT' is used with the function "TrFile-CreateFile"KV
|("TrFile-SetDefaultType"
"TEXT")
TrFile-SetDefaultType
TEXT|
)A.File Manipulation: Get File Contents & Details
|("TrFile-GetDataSize"
TrFile-GetDataSize
|("TrFile-GetResForkSize"
TrFile-GetResForkSize
|("TrDl-Version"
"") = ""
TrDl-Version
<R<<8<98%8! !
Cancel
!;<R<R8;98%8%
;NThe file was created. This example file is actually a real Filemaker file!"M
|("TrDl-DoDialog"
"The file """ &
&""" was created. This example file is actually a real Filemaker file!")
TrDl-DoDialog
The file "
C" was created. This example file is actually a real Filemaker file!
<R<<8<98%8! !
Cancel
!;<R<R8;98%8%
;NThe file could not be created.
Check if it already exists.Oy
<R<<8<98%8! !
Cancel
!;<R<R8;98%8%
;NYou pressed cancel.
A File Manipulation: Delete a file
List the content of a folder (directory).
Parameter 1: switches: this can be one or more of the following:
files list all files in this folder
folders list all folders (subdirectories) in this folder
showaliases list all aliases (shortcuts) in this folder
showshortcuts list all aliases (shortcuts) in this folder (you can use the one you like)
showinvisibles list all invisible files and folders
showpointdirs windows: list also the directories . (current dir) and .. (parent dir)
showpointdB
irs Mac OS: this switch is ignored
Parameter 2: FileSpec : the path to the folder to list.
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a folder.
switches | FileSpecj
Filesn
565,037997236959u
|("TrFile-FindFolder"
"desktop")
TrFile-FindFolder
desktop|Ca
|("TrFile-CreateFile"
&"DeleteMe")
TrFile-CreateFile
DeleteMe
|("TrFile-FindFolder"
"system")
TrFile-FindFolder
system|Fa
|("TrFile-CreateFile"
&"DeleteMe")
TrFile-CreateFile
DeleteMe
|("TrFile-FindFolder"
"trash")
TrFile-FindFolder
trash|Ia
|("TrFile-CreateFile"
&"DeleteMe")
TrFile-CreateFile
DeleteMe
|("TrFile-FindFolder"
"shutdown")
TrFile-FindFolder
shutdown|La
|("TrFile-CreateFile"
&"DeleteMe")
TrFile-CreateFile
DeleteMe
|("TrFile-FindFolder"
"applemenu")
TrFile-FindFolder
applemenu|
defaultX
destinationl
fileX
filespec
filetype1filetype2fi
folderconstant
nameX
prompt
prompt
default
nameX
searchnamet
separator
sourcel
source
filespec
destination
filespecl
switchesr
switches
filespecr
switches
volume
searchnamet
volumet
files
general
turns the modification date for the file specified by the FileSpec. The modification date is also displayed in the Finder or Explorer.
See also the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
the function "TrFile-Get FileSpec Dialog" to get a FileSpec.
hvCombination of "TrFile-Get FileSpec Dialog" followed by a "TrFile-GetContents" function. Gets a text file in one go.
FileSpecj
Filesn
120,09641161193u
TrFile-Get FileSpec Dialogf
Presents the user with a standard dialog and displays all files in a directory. A prompt will be displayed to tell the user which file to select. The function returns a FileSpec for the selected file to be used with one of the file manipulation functions.
Set Field[MyFileName, External(Troi-StandardGetFile, "Please choose a file to import")] returns "HD Mac:Text files:My Letter" if the user selects that particular file.
If the user cancels an error code of "$$-1" is returned.
promptj
Filesn
405,648572093644u
TrFile-GetContentsf
Search
} 4) Click Here to start searching
2) Type a filename
volume name
ABFI>>
Possible Returned error codes
$$-35 = No such volume (Wrong disk name or not mounted).
$$-43 = File not found.
$$-50 = Parameter error.
$$-120 = Directory not found.
3) Set switches
1) Select the disk to search
See also the functions "TrFile-Save FileSpec Dialog" to get a FileSpec for a folder.
O& Og
gcSzG
A-My"
2 )
"$$"
|("TrFile-GetContents"
TrFile-GetContents
|("TrFile-GetFileSize"
) / 1024
TrFile-GetFileSize
|("TrFile-GetDataSize"
TrFile-GetDataSize
|("TrFile-GetResForkSize"
TrFile-GetResForkSize
& "EXP" &
) & ".TAB"
F = "Yes"
|("TrFile-DeleteFile"
TrFile-DeleteFile
|("TrFile-CopyFile"
C & "|" &
TrFile-CopyFile
<> 0
odeWarrior Pro 2. In order to do this CodeWarrior Pro 2 must be
installed first.
If you wish to merge the installations you must install both CodeWarrior
Pro 2 and Co
deWarrior for PalmOS 4 into the same folder. Installing into
different folders will not allow the installer to properly merge the
installations and may result in a corrupted installation.
Note that CodeWarrior for PalmOS 4 is based on components from the
CodeWarrior Pro 2 release. If you have applied updates or patches to
CodeWarrior Pro 2 it will be necessary to reapply those updates after
merge installing CodeWarrior for PalmOS.
CodeWarrior for PalmOS Release 4 installs MWDebug 1.
Export
Cancelh
Replace
An Error occured. See the layout for an explantion of errors.G+
) = 1
support at: support@metrowerks.com
===================================
Alex Harper Metrowerks QA
files
folders
U Internal:
Searching....1.2.pdf
KES:Projecten:Troi FM Plug-In:TEXT:Troi-Text-Plug-in1.0.1 ALL:Troi-Text-Plug-in1.0.1 WWW:Text Plug-in User Guide.pdf
KES:Projecten:Troi FM Plug-In:TEXT:Troi-Text-Plug-in1.2b2:Text Plug-in User Guide.pdf
KES:zData Troi:WWW Site:site980429:software:Text Plug-in User Guide1.2.pdf
KES:Programma's:CodeWarrior Pro 4:CodeWarrior Documentation:PDF:IDE User Guide.pdf
KES:Trash:Graphic Plug-in User Guide.pdf
KES:Trash:Number Plug-in User Guide.pdf
KES:Tr
ash:User Guide Graph.pdf
KES:Projecten:Troi FM Plug-In:GRAPH:Troi-Graph-Plug-in1.0:Graphic Plug-in User Guide.pdf